﻿//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Web;
//using System.Web.UI;
//using System.Web.UI.WebControls;
//using DelonixRegiaHMSys.Core.Services;
//using DelonixRegiaHMSys.Infrastructure.Data;

//namespace DelonixRegiaHMSys.UI.WebForms
//{
//    public partial class RetrieveGuestCreditCardDetails : System.Web.UI.Page
//    {
//        protected void Page_Load(object sender, EventArgs e)
//        {
//            if (!IsPostBack)
//            {
//                BindGridView();
//            }

//        }
//        private void BindGridView()
//        {
//            var gccdservice = new gccdServices(new EfGuestCreditCardDetails());
//            GridViewGCCD.DataSource = gccdservice.GetAll().ToList();
//            GridViewGCCD.DataBind();
//        }
//        protected void UpdateButton_Click(object sender, EventArgs e)
//        {
//            string[] arg = new string[5];
//            arg = ((LinkButton)sender).CommandArgument.ToString().Split(';');
//            string guestID = arg[0];
//            string creditCardNum = arg[1];
//            string cardHolderName = arg[2];
//            string cardType = arg[3];
//            string cardExpirationDate = arg[4];

//            string querystring = "Guest=" + guestID + "&CreditCardNum=" + creditCardNum + "&CardHolderName=" + cardHolderName + "&CardType=" + cardType + "&CardExpirationDate=" + cardExpirationDate;
//            Server.Transfer("~/WebForms/UpdateGuestParticular.aspx?" + querystring);
//        }
//        protected void DeleteButton_Click(object sender, EventArgs e)
//        {
//            string guestID = (((LinkButton)sender).CommandArgument);
//            var gccdservice = new gccdServices(new EfGuestCreditCardDetails());
//            gccdservice.DeleteCreditCardDetail(guestID);
//            BindGridView();
//        }
//    }
//}